Function un.onInit
	MessageBox MB_OK "Warning: If you choose to uninstall this software, all the webapps you installed and all the webapps data will be deleted"
FunctionEnd

Section "Uninstall"
	setOutPath $INSTDIR

	DetailPrint "Removing shorcuts"
	RMDir /r $SMPROGRAMS\CumulusCloud
	
	DetailPrint "Removing service"
	ExecWait '$\"$INSTDIR\bin\service.bat$\" remove CumulusCloud'
	
	DetailPrint "Removing registry keys"
	DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\CumulusCloud"
	DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "CumulusCloud"
	
	DetailPrint "Removing application & data files"
	RMDir /r /REBOOTOK $INSTDIR
SectionEnd